package com.leanyuan.Infor.dao;

import com.leanyuan.Infor.domain.Action;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 相亲相爱一家人
 * @since 2021-05-25
 */
public interface ActionMapper extends BaseMapper<Action> {
    @Select("select a.* from " +
            "t_admin d inner join t_admins d2 on d.admin_id=d2.admin_id  inner join t_roles r on d2.role_id=r.role_id  inner join" +
            "    t_action a on r.action_id=a.action_id where d.admin_Id=#{id}")
    List<Action> findAction(Integer id);

}
